博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
DedeCMS中channelartlist自增参数global.itemindex
阅读量:6838 次
发布时间:2019-06-26

本文共 1996 字,大约阅读时间需要 6 分钟。

在 dede:channelartlist 标签下,使用:

{
dede:global.itemindex runphp='yes'} { /dede:global.itemindex}

 

dede:channel标签下,使用:

[field:global name=autoindex runphp="yes"][/field:global][field:typename/]

 

从网上查到更详细的使用说明:

让dedecms autoindex,itemindex 从0到1开始的办法

[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global] {dede:global name=itemindex runphp="yes"}@me=@me+1;{/dede:global}

 

autoindex itemindex 的使用心得区别

channelartlist 标签下使用

{
dede:global name='itemindex' runphp='yes'}@me;{/dede:global}

 

自增1

arclist 标签下使用 [field:global.autoindex/] 默认从1开始channel 标签下使用 [field:global.autoindex/] 默认从0开始channelartlist 标签下使用 { dede:global.itemindex/} 默认从1开始

 

arclist 从0开始

[field:global name=autoindex runphp="yes"]@me=@me-1;[/field:global]

 

channel 从1开始

[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global][field:typename/]

 

channelartlist 从0开始{dede:global name=itemindex runphp=’yes’}@me=@me-1;{/dede:global}

{dede:channelartlist notypeid='123,124,146,147'} {dede:php}if($refObj->Fields['ispart']){echo $refObj->Fields['typename'];}{ /dede:php}  { /dede:channelartlist}

 

标签下使用 [field:global name=autoindex/]

channel实例

{dede:channel titlelen='32'}
  • [field:typename/]

  • {/dede:channel}

     

    在arclist中使用autoindex runphp 时用这种方式:

    {
    dede:arclist titlelen='22' row='4' flag='c' orderby='id'} [field:title /] [field:global name='autoindex' runphp='yes']if(@me==2){ @me="
    ";}else{ @me=' ';}[/field:global]{/dede:arclist}

     

     

    自增1

    [field:global.autoindex/]

    arclist实例

    {dede:arclist channelid=17 row=6 orderby=pubdate titlelen=40 addfields='docphoto,docjob,doctec' typeid='123,136,146,155,172,182,202'} 
    [field:fulltitle/]
    {/dede:arclist}

     

    如何自由定义 开始的数字

    autoindex/itemindex 可以使用 @me+1;实现由指定数字开始

    遇到类似的问题做下这个笔记,在用到的时候可以灵活发挥!

    list 标签下试用autoindex

    {dede:list pagesize='40' orderby='id'}[field:global name='autoindex' runphp='yes']if(@me%10==0){ @me="test";}else{ @me='';}[/field:global] {/dede:list} 文章来源:https://blog.csdn.net/langyu1021/article/details/78039962

    转载于:https://www.cnblogs.com/xiaomifeng/p/9958729.html

    你可能感兴趣的文章
    Async & generator & Promise
    查看>>
    解决vagrant ssh登录时permission deny的问题
    查看>>
    Dapper,大规模分布式系统的跟踪系统
    查看>>
    Spring源码之XMLBeanFactory
    查看>>
    PopupWindow 点击外部区域无法关闭的问题
    查看>>
    jQuery 遍历
    查看>>
    开源的丰富的flutter Icons库
    查看>>
    内存管理Release和Retain实现原理
    查看>>
    (JVM 笔记)Java虚拟机:Java 内存管理
    查看>>
    一分钟读懂兼容报告——行业对标数据助你定位产品状况
    查看>>
    Axure RP 7.0从入门到精通 Web+APP产品经理原型设计 彩色pdf扫描版
    查看>>
    点击H5页面的时候出现阴影
    查看>>
    js实现一个按照权重抽奖函数
    查看>>
    292 Nim Game
    查看>>
    ConstraintLayout 平分布局
    查看>>
    java版spring cloud+spring boot+redis多租户社交电子商务平台(三)SpringBoot用JdbcTemplates访问Mysql...
    查看>>
    极光推送集成
    查看>>
    git部分基本命令
    查看>>
    292 Nim Game
    查看>>
    Java程序员必会的13种热门技能
    查看>>